source("c:/r/qserver.r")
c <- open_connection()
blp=execute(c,"select from `QUOTE_CDXIG524_CBIN")
ig_bid <- subset(blp, MKTDATA_EVENT_SUBTYPE == 'BID')
ig_ask <- subset(blp, MKTDATA_EVENT_SUBTYPE == 'ASK')
plot(ig_ask$EVENT_TIME, ig_ask$ASK, type="l", xlab = " Event Time ", ylab = "Price", col='red', ylim = c(60,64.5))
lines(ig_bid$EVENT_TIME, ig_bid$BID, col = 'blue')
legend(1,62.6, c("ask","bid"), cex=0.8, col=c("blue","red"), pch=21:22, lty=1:2)